<div class="body">
    <div class="loginTitle">
        <h3 *ngIf="userdata?.id">账号详情</h3>
        <h3 *ngIf="!userdata?.id">账号登录</h3>
    </div>
    <div class="loginBox" *ngIf="!userdata?.id">
        <p>LOGIN</p>
        <form action="../intelligent-shopping/my" class="form">
            <input [(ngModel)]="username" type="text" placeholder="请输入用户名" id="username" name="username" required  class="userName"/>
            <input [(ngModel)]="password" type="password" placeholder="请输入密码" id="password" name="password" required class="passWord">
            <br>
            <input type="submit" (click)="login()" value="登录" class="loginBtn">
            <a href="../intelligent-shopping/register" class="goRegister">去注册</a>
        </form>
    </div>
    <div class="loginBox2" *ngIf="userdata?.id">
        <p> 您已登录</p>
        <div class="member-infor">
            <div class="username" *ngFor="let item of userList">用户名:<span style="color: red;">{{userdata?.get("username")}}</span></div>
            <div class="userid" *ngFor="let item of userList">用户ID:{{userdata?.id}}</div>
        </div>
            <input type="submit" (click)="logout()" value="退出登录" class="loginBtn2">
        </div>
    </div>

